Skip to main content

Troubleshooting

iOS

Build fails: libarclite not found (Xcode 16.2)

Error message

clang++: error: SDK does not contain 'libarclite' at the path '/Applications/Xcode_16.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a'; try increasing the minimum deployment target

Cause

  • Xcode toolchain no longer ships libarclite for deployment targets below iOS 13.

Solution

  1. In Xcode, select your app target.
  2. Open the General tab.
  3. Set Minimum Deployment to iOS 13.0 (or higher).

Linker error: Undefined symbol x3mads::XMediatorAds / CocoaPods warnings overriding settings

Symptoms

  • Error message:

    Undefined symbol: x3mads::XMediatorAds
  • And/or CocoaPods install warnings like:

    [!] The `<YourTarget> [Debug]` target overrides the `GCC_PREPROCESSOR_DEFINITIONS` build setting...
    [!] The `<YourTarget> [Debug]` target overrides the `LIBRARY_SEARCH_PATHS` build setting...
    [!] The `<YourTarget> [Debug]` target overrides the `OTHER_LDFLAGS` build setting...

Cause

  • The target overrides CocoaPods-managed build settings, preventing proper linkage of Pods (including the X3M SDK components).

Solution

  1. In Xcode, select your app target and open Build Settings.
  2. For the following settings, ensure $(inherited) is present (do not remove existing values):
    • OTHER_LDFLAGS
    • LIBRARY_SEARCH_PATHS
    • GCC_PREPROCESSOR_DEFINITIONS
  3. In your iOS project directory, run pod install to regenerate the workspace with the inherited settings.
  4. Clean build folder (Product > Clean Build Folder) and rebuild.
note

After running pod install, verify that the CocoaPods warnings about overridden build settings no longer appear in the install output.


Linker errors: MediaPlayer / GameController symbols not found

Error messages

Undefined symbol: _GCControllerDidConnectNotification
Undefined symbol: _GCControllerDidDisconnectNotification
Undefined symbol: _MPMoviePlayerPlaybackDidFinishNotification
Undefined symbol: _MPMoviePlayerPlaybackStateDidChangeNotification
Undefined symbol: _OBJC_CLASS_$_MPMoviePlayerController

Cause

  • Required Apple frameworks are not linked in the target.

Solution

  1. In Xcode, select your app target > Build Phases.
  2. Expand Link Binary With Libraries.
  3. Add the following frameworks:
    • MediaPlayer.framework
    • GameController.framework
  4. Rebuild the project.

Android

Build compatibility (AGP/Gradle)

Some build toolchains ship older Android Gradle Plugin (AGP) and Gradle versions that are incompatible with the latest versions of Google Mobile Ads and other networks.

Use the steps below to update your Android project to a compatible toolchain.

Manually update Gradle

Prerequisites Before continuing, ensure you have the following:

  • Download and install the latest stable version of Android Studio.
  • Optional: For details on building for Android, see Java versions in Android builds

Steps:

  1. Use JDK 17 or later

    In Android Studio, set Gradle JDK to 17 or newer (File > Settings > Build, Execution, Deployment > Build Tools > Gradle > Gradle JDK). Install if missing.

  2. Target SDK 34+

    Ensure your app module targets API Level 34 or higher.

    android {
    compileSdk 34
    defaultConfig {
    targetSdk 34
    }
    }
  3. Update the project-level build.gradle to AGP 8.1.1+

    plugins {
    id 'com.android.application' version '8.1.1' apply false
    id 'com.android.library' version '8.1.1' apply false
    }

    task clean(type: Delete) {
    delete rootProject.buildDir
    }
  4. Update /gradle/gradle-wrapper.properties to Gradle 8.1.1+

    distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
  5. Sync and rebuild

    Sync Gradle and rebuild your project from Android Studio.

When building with older Android Gradle Plugin versions, you might encounter the following crash at runtime:

Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.datastore.preferences.PreferenceDataStoreDelegateKt"

Cause

This issue occurs due to an incompatibility with the Android Gradle Plugin (AGP) version in your build. The SDK relies on AndroidX DataStore components which require a newer version of AGP.

Solution

You have two options to resolve this issue:

  • Update Android Gradle Plugin (Recommended)

    Update AGP to 8.1.1 or higher (Android Studio will guide the upgrade if available for your Gradle version).

  • Manually update Gradle/AGP

    Follow the steps in the Manually update Gradle section above to update AGP and the Gradle wrapper.